
<div class="h_status">
	<div class="r_option">
		<a href="$theurl&goto=up">上一张</a><span class="pipe">|</span>
		<a href="$theurl&goto=down" id="nextlink">下一张</a><span class="pipe">|</span>
		<!--{if $_GET['play']}-->
		<a href="javascript:;" id="playid" onclick="playNextPic(false);">停止播放</a>
		<!--{else}-->
		<a href="javascript:;" id="playid" onclick="playNextPic(true);">幻灯播放</a>
		<!--{/if}--><span id="displayNum"></span>
	</div>

	<!--{if $album[picnum]}-->当前第 $sequence 张<span class="pipe">|</span>共 $album[picnum] 张图片<!--{/if}-->&nbsp;
	<!--{if $album['friend']}-->
	<span class="locked gray">{$friendsname[$value[friend]]}</span>
	<!--{/if}-->
</div>


<div class="photobox">

	<div id="photo_pic" class="<!--{if $pic[magicframe]}--> magicframe magicframe$pic[magicframe]<!--{/if}-->">
	<!--{if $pic[magicframe]}-->
	<div class="pic_lb1">
	<table cellpadding="0" cellspacing="0" class="">
		<tr>
			<td class="frame_jiao frame_top_left"></td>
			<td class="frame_x frame_top_middle"></td>
			<td class="frame_jiao frame_top_right"></td>
		</tr>
		<tr>
			<td class="frame_y frame_middle_left"></td>
			<td class="frame_middle_middle"><!--{/if}--><a href="$theurl&goto=down"><img src="$pic[pic]" alt="" /></a><!--{if $pic[magicframe]}--></td>
			<td class="frame_y frame_middle_right"></td>
		</tr>
		<tr>
			<td class="frame_jiao frame_bottom_left"></td>
			<td class="frame_x frame_bottom_middle"></td>
			<td class="frame_jiao frame_bottom_right"></td>
		</tr>
	</table>
	</div><!--{/if}--></div>


	<div class="yinfo">
		<p>$pic[title]</p>

		<!--{if $topic}-->
		<p>
			<img src="image/app/topic.gif" align="absmiddle">
			凑个热闹：<a href="space.php?do=topic&topicid=$topic[topicid]">$topic[subject]</a></p>
		<!--{/if}-->

		<!--{if $do!='event' && $event[title]}-->
		<p>来自活动：<a href="space.php?do=event&id=$event[eventid]&view=pic">$event[title]</a></p>
		<!--{/if}-->

		<p class="gray">
			<!--{if $pic[hot]}--><span class="hot"><em>热</em>$pic[hot]</span><!--{/if}-->
			<!--{if $do=='event'}--><a href="space.php?uid=$pic[uid]" target="_blank">$_SN[$pic[uid]]</a><!--{/if}-->
			上传于 <!--{date('Y-m-d H:i',$pic[dateline])}--> ($pic[size])
		</p>

		<!--{if isset($_GET['exif'])}-->
			<!--{if $exifs}-->
				<!--{loop $exifs $key $value}-->
					<!--{if $value}--><p>$key : $value</p><!--{/if}-->
				<!--{/loop}-->
			<!--{else}-->
				<p>无EXIF信息</p>
			<!--{/if}-->
		<!--{/if}-->
	</div>


	<table width="100%">
	<tr><td align="left">
		<a href="$pic[pic]" target="_blank">查看原图</a>
		<!--{if !isset($_GET['exif'])}-->
		<span class="pipe">|</span><a href="$theurl&exif">查看EXIF信息</a>
		<!--{/if}-->
	</td>
	<td align="right">
		<a href="cp.php?ac=share&type=pic&id=$pic[picid]" id="a_share_$pic[picid]" class="a_share" onclick="ajaxmenu(event, this.id, 1)" class="a_share">分享</a>

		<!--{if $pic[uid] == $_SGLOBAL[supe_uid]}-->
		<!--{if $_SGLOBAL[magic][frame]}-->
			<img src="image/magic/frame.small.gif" class="magicicon">
			<!--{if $pic[magicframe]}-->
			<a id="a_magic_frame" href="cp.php?ac=magic&op=cancelframe&idtype=picid&id=$pic[picid]" onclick="ajaxmenu(event,this.id)">取消相框</a>
			<!--{else}-->
			<a id="a_magic_frame" href="magic.php?mid=frame&idtype=picid&id=$pic[picid]" onclick="ajaxmenu(event,this.id, 1)">加相框</a>
			<!--{/if}-->
			<span class="pipe">|</span>
		<!--{/if}-->
		<a href="cp.php?ac=album&op=editpic&albumid=$pic[albumid]&picid=$pic[picid]">管理图片</a><span class="pipe">|</span>
		<!--{/if}-->

		<!--{if $_SGLOBAL[supe_uid] == $pic[uid] || checkperm('managealbum')}-->
		<a href="cp.php?ac=album&op=edittitle&albumid=$pic[albumid]&picid=$pic[picid]" id="a_set_title" onclick="ajaxmenu(event, this.id)">编辑说明</a><span class="pipe">|</span>
		<a href="cp.php?ac=topic&op=join&id=$pic[picid]&idtype=picid" id="a_topicjoin_$pic[picid]" onclick="ajaxmenu(event, this.id)">凑热闹</a><span class="pipe">|</span>
		<a href="admincp.php?ac=pic&picid=$pic[picid]" target="_blank">删除</a><span class="pipe">|</span>
		<!--{/if}-->

		<!--{if checkperm('managealbum')}-->
		<a href="cp.php?ac=album&picid=$pic[picid]&op=edithot" id="a_hot_$pic[picid]" onclick="ajaxmenu(event, this.id)">热度</a><span class="pipe">|</span>
		<!--{/if}-->
		<a href="cp.php?ac=common&op=report&idtype=picid&id=$pic[picid]" id="a_report" onclick="ajaxmenu(event, this.id, 1)">举报</a>
	</td></tr>
	</table>
</div>

<div id="click_div" style="margin:0 auto;padding:10px;width:100%;text-align:left;">
	<!--{template space_click}-->
</div>


<div style="padding-top:20px; width:100%; overflow:hidden;" id="pic_comment">

	<h2>评论</h2>
	<div class="page">$multi</div>
	<div class="comments_list" id="comment">
		<!--{if $cid}-->
		<div class="notice">
			当前只显示与你操作相关的单个评论，<a href="$theurl#comment">点击此处查看全部评论</a>
		</div>
		<!--{/if}-->

		<ul id="comment_ul">
		<!--{loop $list $value}-->
			<!--{template space_comment_li}-->
		<!--{/loop}-->
		</ul>
	</div>
	<div class="page">$multi</div>
	<form id="quickcommentform_{$picid}" name="quickcommentform_{$picid}" action="cp.php?ac=comment" method="post" class="quickpost" style="padding-bottom: 1em;">
		<table cellpadding="0" cellspacing="0">
			<tr>
				<td>
					<a href="###" id="comment_face" onclick="showFace(this.id, 'comment_message');return false;"><img src="image/facelist.gif" align="absmiddle" /></a>
					<!--{if $_SGLOBAL['magic']['doodle']}-->
					<a id="a_magic_doodle" href="magic.php?mid=doodle&showid=comment_doodle&target=comment_message" onclick="ajaxmenu(event, this.id, 1)"><img src="image/magic/doodle.small.gif" class="magicicon" />涂鸦板</a>
					<!--{/if}-->
					<br />
					<textarea id="comment_message" onkeydown="ctrlEnter(event, 'commentsubmit_btn');" name="message" rows="5" cols="60" style="width: 380px;"></textarea>
				</td>
			</tr>
			<tr>
				<td>
				<input type="hidden" name="refer" value="$theurl" />
				<input type="hidden" name="id" value="$picid">
				<input type="hidden" name="idtype" value="picid">
				<input type="hidden" name="commentsubmit" value="true">
				<input type="button" id="commentsubmit_btn" name="commentsubmit_btn" class="submit" value="评论" onclick="ajaxpost('quickcommentform_{$picid}', 'comment_add')" />
				<span id="__quickcommentform_{$picid}"></span>
				</td>
			</tr>
		</table>
		<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
	</form>

</div>


<script type="text/javascript">
<!--
	var interval = 5000;
	var timerId = -1;
	var derId = -1;
	var replay = false;
	var num = 0;
	var endPlay = false;
	function forward() {
		window.location.href = '$theurl&goto=down&play=1';
	}
	function derivativeNum() {
		num++;
		$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
	}
	function playNextPic(stat) {
		if(stat || replay) {
			derId = window.setInterval('derivativeNum();', 1000);
			$('displayNum').innerHTML = '[' + (interval/1000 - num) + ']';
			$('playid').innerHTML = '停止播放';
			timerId = window.setInterval('forward();', interval);
		} else {
			replay = true;
			num = 0;
			if(endPlay) {
				$('playid').innerHTML = '重新播放';
			} else {
				$('playid').innerHTML = '幻灯播放';
			}
			$('displayNum').innerHTML = '';
			window.clearInterval(timerId);
			window.clearInterval(derId);
		}
	}
	<!--{if $_GET['play']}-->
	<!--{if $sequence && $album['picnum']}-->
	if($sequence == $album[picnum]) {
		endPlay = true;
		playNextPic(false);
	} else {
		playNextPic(true);
	}
	<!--{else}-->
	playNextPic(true);
	<!--{/if}-->
	<!--{/if}-->

	function update_title() {
		$('title_form').style.display='';
	}
	
	//彩虹炫
	var elems = selector('div[class~=magicflicker]'); 
	for(var i=0; i<elems.length; i++){
		magicColor(elems[i]);
	}

//-->
</script>
